x86/domain: factor out pv_domain_destroy
authorWei Liu <wei.liu2@citrix.com>
Fri, 7 Apr 2017 14:49:42 +0000 (15:49 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 7 Jun 2017 11:15:56 +0000 (12:15 +0100)
commit85dd07f8dee54d4947d9893d58122b8f727e6bb8
treef637e2ebc480a7bcaf64f49674d5ef61bba06da3
parent9663602bbac39641714b67261ccdf19c88f9b3b0
x86/domain: factor out pv_domain_destroy

Now this function also frees the perdomain mapping. It is safe to do so
because destroy_perdomain_mapping is idempotent.

Move free_perdomain_mappings after pv_domain_destroy. It is safe to do
so because both destroy_perdomain_mapping and free_perdomain_mappings
are idempotent.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain.c